package com.jinzhi.jzapi.courses.Controller;

import com.jinzhi.common.base.BaseController;
import com.jinzhi.common.utils.Result;
import com.jinzhi.jzweb.pojo.RecordsVo;
import com.jinzhi.jzweb.pojo.entity.Records;
import com.jinzhi.jzweb.service.ChapterDocumentService;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


@Slf4j
@Controller
@RequestMapping("/chapterDocument")
@Api(value = "资源文件管理",tags = "资源文件管理")
public class ChapterDocumentController extends BaseController {

    private final ChapterDocumentService documentService;

    public ChapterDocumentController(ChapterDocumentService documentService) {
        this.documentService = documentService;
    }


    @ApiResponses({
            @ApiResponse(code = 200,message = "ok",response = RecordsVo.class)
    })
    @ApiOperation(value = "数据概览接口", notes = "数据概览接口")
    @ResponseBody
    @GetMapping("/getConceptType")
    public Result getConceptType(){
        return Result.ok(documentService.getConceptType());
    }


    @ApiOperation(value = "点击次数增加", notes = "点击次数增加")
    @ResponseBody
    @PostMapping("/tapUpdate")
    public Result tapUpdate(Records records){
        return Result.ok(documentService.tapUpdate(records));
    }



    @ApiOperation(value = "资源统计页面入口", notes = "资源统计页面入口")
    @GetMapping("/resourceStatistics")
    public String Chapter(Long id){
        return "jzweb/resourceStatistics/resourceStatistics";
    }



}
